home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 192 < prev    next >
Encoding:
Text File  |  1996-08-05  |  1.7 KB  |  55 lines

  1. Path: nntp-server.caltech.edu!news
  2. From: "Matthew A. Clapp" <mclapp@thunder.caltech.edu>
  3. Newsgroups: comp.lang.c++
  4. Subject: newbie troubles with g++
  5. Date: 2 Jan 1996 22:22:23 GMT
  6. Organization: California Institute of Technology, Pasadena
  7. Message-ID: <4ccb6v$ppk@gap.cco.caltech.edu>
  8. NNTP-Posting-Host: thunder.caltech.edu
  9. Mime-Version: 1.0
  10. Content-Type: text/plain; charset=us-ascii
  11. Content-Transfer-Encoding: 7bit
  12. X-Mailer: Mozilla 1.1N (X11; I; Linux 1.2.8 i486)
  13. X-URL: news:comp.lang.c++
  14.  
  15. Hi all,
  16.  
  17.     I'm new to C++, but managed to hack some simple programs at home
  18. using Borland Turbo C++.  When I try to compile these again using g++, it
  19. just spews at me.  Even the simplest program I tried:
  20.  
  21. ------------------------------
  22. #include<iostream.h>
  23.  
  24. main()
  25. {
  26.   cout << "hello world";
  27.   return 0;
  28. }
  29. -------------------------------
  30.  
  31. gives me the following errors:
  32.  
  33. -------------------------------------------------------
  34. /usr/include/g++/streambuf.h: In method `long int 
  35. streambuf::pubseekoff(long int, enum ios::seek_dir, int = 3)':
  36. In file included from /usr/include/g++/iostream.h:31,
  37.                  from llist.cc:7:
  38. /usr/include/g++/streambuf.h:351: warning: implicit declaration of 
  39. function `int _IO_seekoff(...)'
  40. /usr/include/g++/streambuf.h: In method `long int 
  41. streambuf::pubseekpos(long int, int = 3)':
  42. /usr/include/g++/streambuf.h:353: warning: implicit declaration of 
  43. function `int _IO_seekpos(...)'
  44. ---------------------------------------------------
  45.  
  46. It creates an executable that gives a segmentation fault when run.
  47. I use 'g++ foo.cc -o foo' to compile.
  48.  
  49. I assume there's something wrong with my g++ setup.  Anyone know what
  50. it might be?  BTW I'm using Linux 1.2.8 and gcc v2.7.0.
  51.  
  52. Thanks in advance!
  53. Matt
  54.  
  55.